#ifndef DISTRIBUTED_LOGGER_H_
#define DISTRIBUTED_LOGGER_H_
#include <string>
#include <log4cpp/Category.hh>

#define LOG_DEBUG Logger::getInstance()->getHandle()->debug
#define LOG_INFO Logger::getInstance()->getHandle()->info
#define LOG_WARN Logger::getInstance()->getHandle()->warn
#define LOG_ERROR Logger::getInstance()->getHandle()->error

class Logger{
public:
    Logger();
    virtual ~Logger();

    bool init(std::string log_file_path);

    log4cpp::Category *getHandle();

    static Logger *getInstance();

private:
    static Logger *Instance; 
    log4cpp::Category *_category = nullptr;
};

#endif
